﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="payQR.aspx.cs" Inherits="JYJJ.Web.Pages.payQR" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../js/layui/css/layui.css" rel="stylesheet" />
    <link href="../css/base_siva.css" rel="stylesheet" type="text/css" />
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/jquery.js"></script>
    <link href="../css/main.css" rel="stylesheet" />
    <script type="text/javascript">
        function pay_status() {
            var order_id = $("#txtTrano").val();
            var donateId = $("#donateId").val();
            $.ajax({
                url: '../Handlers/Handlers_Order.ashx?methon=check_order',
                dataType: 'json',
                type: 'post',
                data: { 'order_id': order_id },
                success: function (data) {
                    if (data == '1') {
                        window.clearInterval(1); //销毁定时器
                        setTimeout(function () {
                            //跳转到结果页面，并传递状态
                            window.location.href = "zhengshu.aspx?orderId=" + order_id + "&donateId=" + donateId;
                        }, 1000)
                    }
                },
                error: function () {
                    window.clearInterval(1); //销毁定时器
                    alert("缴费失败");
                },

            });
        }
        function go_zhengshu() {
            var order_id = $("#txtTrano").val();
            var donateId = $("#donateId").val();
            $.ajax({
                url: '../Handlers/Handlers_Order.ashx?methon=check_order',
                dataType: 'json',
                type: 'post',
                data: { 'order_id': order_id },
                success: function (data) {
                    if (data == '1') {
                        //跳转到结果页面，并传递状态
                        window.location.href = "zhengshu.aspx?orderId=" + order_id + "&donateId=" + donateId;
                    }
                    else {
                        alert("您还未缴费");
                    }
                },
                error: function () {
                    alert("您还未缴费");
                },

            });
        }
        $(document).ready(function () {
            var payType = $("#hidPayType").val();
            if (payType == "1") {
                setInterval(pay_status, 5000, this);
            }
        });
    </script>
</head>
<body>
    <div id="main">
        <div class="albums_first">
            <input type="hidden" id="txtTrano" value="" runat="server" />
            <input type="hidden" id="donateId" value="" runat="server" />
            <input type="hidden" id="hidPayType" value="" runat="server" />
            <div class="title wrapfix">
                <h2>付费</h2>
                <div></div>
            </div>
            <div style="height: 550px;">
                <div style="width: 890px; height: 100px; border-bottom: 2px solid red;">
                    <div style="width: 640px; height: 100px; float: left;">
                        <div style="margin-left: 20px; margin-top: 15px; width: 850px; height: 25px; line-height: 25px;"><b>收款方：</b>上海视觉艺术学院</div>
                        <div style="margin-left: 20px; width: 850px; height: 25px; line-height: 25px;"><b>订单类型：</b><label runat="server" id="lbOrderType"></label></div>
                        <div style="margin-left: 20px; width: 850px; height: 25px; line-height: 25px;"><b>订单编号：</b><label runat="server" id="lblTrano"></label></div>
                    </div>
                    <div style="width: 225px; height: 100px; float: right; line-height: 100px; padding-left: 20px;">
                        应付金额：<font style="font-weight: bold; font-size: 35px; color: red;"><label runat="server" id="lblFee"></label></font> 元
                    </div>
                </div>
                <div style="width: 890px; height: 210px; margin-top: 50px;">
                    <div style="width: 200px; height: 200px; margin-left: auto; margin-right: auto;">
                        <asp:Image ID="imgWx" runat="server" Style="width: 200px; height: 200px;" />
                    </div>
                </div>
                <div style="width: 890px; height: 100px;">
                    <div style="width: 200px; height: 80px; margin-left: auto; margin-right: auto;">
                        <img src="../Images/wxremark.png" width="200" height="66" />
                    </div>
                </div>
                <div style="width: 870px; height: 50px;">
                    <div style="width: 890px; height: 45px; margin-left: 20px; line-height: 45px;">
                        提示：微信支付成功，5秒钟后会自动跳转，如果未跳转，请点击<a href="javascript:void(0);" onclick="go_zhengshu();" style="color: red; text-decoration: none;">微信支付成功5秒钟后页面未跳转点击</a>
                    </div>
                </div>
            </div>
        </div>

    </div>
</body>
</html>
